package com.e3.basdoc.goodscls.client;

import com.e3.basdoc.goodscls.model.GoodsClsModel;
import com.e3.template.tgf.TGFEditorDialog;
import com.e3.template.tgf.TGFSimpleFormPanel;
import com.e3.web.core.client.GwtAsyncCallback;

public class GoodsClsEditorDialog extends TGFEditorDialog<GoodsClsModel> {
	
	private GoodsClsRPCServiceAsync service = GoodsClsRPCService.Util.getInstance();

	@Override
	public TGFSimpleFormPanel<GoodsClsModel> createFormPanel() {
		return new GoodsClsFormPanel();
	}

	@Override
	public void executeNewService(final GoodsClsModel model, GwtAsyncCallback<GoodsClsModel> callback) {
		service.newGoodsCls(model, callback);
	}

	@Override
	public void executeModifyService(final GoodsClsModel model, GwtAsyncCallback<GoodsClsModel> callback) {
		service.modifyGoodsCls(model, callback);
	}

	@Override
	public String[] getNotNullFieldNames() {
		return GoodsClsHelper.INSTANCE.getNotNullFieldNames();
	}


}
